//
//  ViewController.swift
//  CCFoundation_Swift
//
//  Created by zjh on 2021/10/15.
//

import UIKit

class ViewController: CCViewController_Swift {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = .white
        let button = UIButton.init(frame: CGRect.init(x: (ScreenWidth - 100)/2, y: (ScreenHeight - 50)/2, width: 50, height: 30))
        button.hitEdge = UIEdgeInsets(top: -20, left: -20, bottom: -20, right: -20)
        button.backgroundColor = .yellow
        button.addTarget(self, action: #selector(btnAction), for: .touchUpInside)
        self.view.addSubview(button)
        debugPrint("屏幕大小：\(UIScreen.main.bounds.size)")
        // Do any additional setup after loading the view.
    }
    
    override func configNavigationBar() {
        if #available(iOS 15, *) {
            let barApp = UINavigationBarAppearance.init()
            barApp.backgroundColor = .red
            self.navigationController?.navigationBar.scrollEdgeAppearance = barApp
            self.navigationController?.navigationBar.standardAppearance = barApp
        }
    }
    
    @objc func btnAction() {
        let vc = ViewController1()
        self.navigationController?.pushViewController(vc, animated: true)
    }

}

